package com.winning.java.threads;

import lombok.SneakyThrows;

import java.util.function.Consumer;

/**
 * @author: rqx
 * @create: 2023/6/5 10:40
 * @description:
 */
public class MyThread{

    public static Thread run(MyRunnable runnable){
        var t = new Thread(new Runnable() {
            @SneakyThrows
            @Override
            public void run() {
                runnable.myRun();
            }
        });
        return t;
    }
}
